package initialize

import (
	"github.com/flipped-aurora/gin-vue-admin/server/global"
	"github.com/flipped-aurora/gin-vue-admin/server/model/after_sale_order"
	"github.com/flipped-aurora/gin-vue-admin/server/model/brand"
	"github.com/flipped-aurora/gin-vue-admin/server/model/classey"
	"github.com/flipped-aurora/gin-vue-admin/server/model/order"
	"github.com/flipped-aurora/gin-vue-admin/server/model/product"
	"github.com/flipped-aurora/gin-vue-admin/server/model/products"
	"github.com/flipped-aurora/gin-vue-admin/server/model/seckill"
)

func bizModel() error {
	db := global.GVA_DB
	err := db.AutoMigrate(product.Product{}, products.Product{}, classey.Category{}, brand.Brand{}, order.Order{}, seckill.SeckillActivity{}, after_sale_order.AfterSaleOrder{})
	if err != nil {
		return err
	}
	return nil
}
